// 导入二次封装的axios文件
import service from './request'

// 设置请求并且命名导出
// 轮播图
export function swipe( params = {}){
    return service.get('/banner/list',{ params })
}
// 商铺列表
export function shop( params = {} ){
    return service.get('/shop/list',{params})
}
// 爆爆团列表
export function tuan( params = {} ){
    return service.get('/tuan/list',{params})
}
// 详情页
export function detail( params = {} ){
    return service.get('/shop/shopinfo',{params})
}
// 登录
export function user_login( params = {} ){
    return service.post('/user/login',params)
}
// 注册
export function user_register( params = {} ){
    return service.post('/user/register',params)
}
// 收藏列表
export function favlist( params = {} ){
    return service.get('/shop/favlist',{params})
}
// 收藏店铺
export function fav( params = {} ){
    return service.post('/shop/fav',params)
}
// 取消收藏
export function unfav( params = {} ){
    return service.post('/shop/unfav',params)
}
// 购物车列表
export function shopcart( params = {} ){
    return service.get('/shopcart/list',{params})
}
// 清空购物车列表
export function clear_shopcart( params = {} ){
    return service.post('/shopcart/clear',params)
}
// 购物车加一
export function shopcart_add( params = {} ){
    return service.post('/shopcart/add',params)
}
// 购物车减一
export function shopcart_sub( params = {} ){
    return service.post('/shopcart/sub',params)
}
// 搜索
export function shop_search( params = {} ){
    return service.get('/shop/search',{params})
}
// 收货地址-列表
export function address_list( params = {} ){
    return service.get('/address/list',{ params } );
}
// 收货地址-新建
export function address_add( params = {} ){
    return service.post('/address/add', params );
}
// 收货地址-删除
export function address_del( params = {} ){
    return service.post('/address/del', params );
}
// 收货地址-编辑
export function address_edit( params = {} ){
    return service.post('/address/edit', params );
}